package com.joysuch.wwyt.monitoringcenter.service;

import com.joysuch.wwyt.api.basedata.bean.BpJobSyncBean;
import com.joysuch.wwyt.bp.entity.BpJob;
import com.joysuch.wwyt.bp.entity.contractor.BpContractorStaff;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.core.entity.BaseUser;
import com.joysuch.wwyt.dzhapi.bean.ApiBaseUserBean;
import com.joysuch.wwyt.dzhapi.dto.BuildDataDto;
import com.joysuch.wwyt.monitoringcenter.bean.*;
import org.springframework.http.ResponseEntity;

import java.util.ArrayList;
import java.util.List;

public interface LocateServerService {

    List<McAlarmMessageBean> alarmMessages();

    LocateServerAlarmResult getLocateServerAlarmResult();

    /**
     * 
     * @param bean
     * flag 是否需要logintoken true: 需要 false: 不需要
     * @return
     */
    ResultBean getLocateAlarm(LocateAlarmBean bean);

    ResultBean areaAlarmBatch(LocateAlarmBatchBean bean);

    int getLocateAlarmCount(String buildId);

    void syncLocateUsers(List<?> list, Integer flag);

    void syncLocateUsers(List<?> newList, Long newTenentId, String newOrgCode, String oldOrgCode, Long oldTenentId, String oldUniqueId, String oldBuildId, String newBuildId);

    String getLoginToken();
    
    String getLoginTokenForWeb(Long tenentId, String orgCode);

    String getApiLoginToken(BuildDataDto buildDataDto);

    String getLoginToken(Long tenentId, String orgCode);

    String getBuildId();

    String getUrl(String flag, Long tenentId, String orgCode);

    ResponseEntity orientationSave(Object bean, Class clazz, String flag);

    ResponseEntity orientationSave(Object bean, Class clazz, String flag, Long tenentId, String orgCode);

    String workArea(Object bean, Integer saveOrDelete);

    <T> ResponseEntity<T> rest(Object bean, String loginToken, String url, Class T);

    public <T> ResponseEntity<T> restPost(Object bean, String url, Class T);

    public <T> ResponseEntity<T> apiRestPost(Object bean, String url, Class T, BuildDataDto dto);

    void labelUntie(String sn);

    String getLocateVersion();

    String getApiLocateVersion(BuildDataDto dto);

    String getLocateVersion(Long tenentId, String orgCode);

    String getIpPortUrl(String url);

    String getApiIpPortUrl(String url, BuildDataDto dto);

    int batchUserDelete(List<Long> ids);

    int batchStaffDelete(List<Long> ids);

    List<SyncBatchDataReturnBean> syncSaveUser(List<BaseUser> users, String buildId, String loginToken);

    List<SyncBatchDataReturnBean> apiSyncSaveUser(List<BaseUser> users, String buildId, String loginToken, BuildDataDto dto);

    List<SyncBatchDataReturnBean> syncSaveStaff(List<BpContractorStaff> staffs, String buildId, String loginToken);

    String getV3ScreenToken();

    String getBuildIdByTenentIdAndOrgCode(Long tenentId, String orgCode);

    public <T> ResponseEntity<T> restPostCross(Object bean, String url, Class T, Long tenentId, String orgCode, String buildId);

    void apiSyncLocateUsers(List<?> list, Integer flag, BuildDataDto buildDataDto);

    String getHttpIpPort(String ipPort);
}
